/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.util.Random;

/**
 *
 * @author ArandiLopez
 */
public class Laberinto {

    /**
     *Variables
     */
    public static final int FILAS = 15;
    public static final int COLUMNAS = 15;
    private boolean[][] maze;

    /**
     *Constructor
     */
    public Laberinto() {
        maze = new boolean[FILAS][COLUMNAS];
        llenarMatriz();
        //matrix = new JLabel[FILAS][COLUMNAS];
        //matrix = new JLabel[ANCHO][ALTO];
    }

    /**
     *
     * @return Una matriz booleana.
     */
    public boolean[][] getMaze() {
        return maze;
    }

    /**
     *
     * @param maze
     */
    public void setMaze(boolean[][] maze) {
        this.maze = maze;
    }

    private void llenarMatriz() {
        Random r = new Random();
        for (int i = 0; i < FILAS; i++) {
            for (int j = 0; j < COLUMNAS; j++) {
                maze[i][j] = r.nextBoolean();
            }
        }
        maze[1][1] = true;
        maze[FILAS-2][COLUMNAS-2] = true;
        for(int i=0;i<COLUMNAS;i++)
            maze[0][i] = false;
        for(int i =0 ; i<FILAS;i++)
            maze[i][0]=false;
        for(int i = 0; i<COLUMNAS;i++)
            maze[FILAS-1][i] = false;
        for(int i = 0; i < FILAS ; i++)
            maze[i][COLUMNAS-1] = false;
    }
}
